#ifndef ADDROUTEDIALOG_H
#define ADDROUTEDIALOG_H

#include <QDialog>
#include <QFileDialog>
#include <QDesktopServices>
#include <QUrl>
#include <QMessageBox>
#include "point.h"
#include "route.h"

// Диалоговое окно "Добавление маршрута".

namespace Ui {
class AddRouteDialog;
}

class AddRouteDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddRouteDialog(const QList <Point>&, QWidget *parent = 0);
    ~AddRouteDialog();
    bool Result(Route*, bool&) const;
private:
    Ui::AddRouteDialog *ui;
    QList <Point> formPointList;
    bool IsEnabledToSave(void) const;
private slots:
    void on_linkfileButton_clicked();
    void on_deleteFileButton_clicked();
    void on_addPointButton_clicked();
    void on_removePointButton_clicked();
    void on_upPointButton_clicked();
    void on_downPointButton_clicked();
    void on_routeNameLineEdit_textChanged(const QString &arg1);
    void on_pointFindLineEdit_returnPressed();
    void on_fileListWidget_doubleClicked(const QModelIndex &index);
    void on_allPointListWidget_currentRowChanged(int currentRow);
    void on_routePointListWidget_currentRowChanged(int currentRow);
};

#endif // ADDROUTEDIALOG_H
